/*
wellbye：这个文件是自动生成的，不要手工修改！ 
*/
using System;
using ILRuntime.CLR.Method;
using ILRuntime.Other;
using ILRuntime.Runtime.Enviorment;
using ILRuntime.Runtime.Intepreter;

[ILRAdaptor]
public class ILRAdaptor_UICollectionViewSource : CrossBindingAdaptor
{
    public override Type BaseCLRType { get { return typeof(UIKit.UICollectionViewSource); } }
    public override Type AdaptorType { get { return typeof(Adaptor); } }

    public override object CreateCLRInstance(ILRuntime.Runtime.Enviorment.AppDomain appDomain, ILTypeInstance instance)
    {
        return new Adaptor(appDomain, instance); //创建一个新的实例
    }

    //实际的适配器类需要继承你想继承的那个类，并且实现CrossBindingAdaptorType接口
    public class Adaptor : UIKit.UICollectionViewSource, CrossBindingAdaptorType
    {
        ILTypeInstance instance;
        ILRuntime.Runtime.Enviorment.AppDomain appDomain;

        public Adaptor() { }

        public Adaptor(ILRuntime.Runtime.Enviorment.AppDomain appDomain, ILTypeInstance instance)
        {
            this.appDomain = appDomain;
            this.instance = instance;
        }

        public ILTypeInstance ILInstance { get { return instance; } }

        
        
        IMethod methodCanFocusItem0;
        bool isCallingCanFocusItem0= false;
        
            public override System.Boolean CanFocusItem(UIKit.UICollectionView p0, Foundation.NSIndexPath p1) 
            { 
                if (methodCanFocusItem0 == null && instance!=null )
                {
                    methodCanFocusItem0 = instance.Type.GetMethod("CanFocusItem", 2);
                }
                if (methodCanFocusItem0 != null && !isCallingCanFocusItem0)
                {
                    isCallingCanFocusItem0 = true;

                    try{
                        
                        //有参数，打包成数组
                        object[] param=new object[]{
                                p0,
                                p1,
                        };
                        object ret = appDomain.Invoke(methodCanFocusItem0, instance, param );
                        
                        
                        isCallingCanFocusItem0 = false;

                        
                        return (System.Boolean)ret;
                        
                    }
                    catch(Exception e){
                        mb.App.logger.Log("**** Catch Exception In CanFocusItem *****");
                        mb.App.logger.Log(e.ToString());
                        mb.App.logger.Log("**********************");
                        throw e;
                    }
                }
                else
                {
                    
                    
                        
                            return base.CanFocusItem(p0, p1);
                        
                    

                }
            }
        
        
        
        IMethod methodCanMoveItem1;
        bool isCallingCanMoveItem1= false;
        
            public override System.Boolean CanMoveItem(UIKit.UICollectionView p0, Foundation.NSIndexPath p1) 
            { 
                if (methodCanMoveItem1 == null && instance!=null )
                {
                    methodCanMoveItem1 = instance.Type.GetMethod("CanMoveItem", 2);
                }
                if (methodCanMoveItem1 != null && !isCallingCanMoveItem1)
                {
                    isCallingCanMoveItem1 = true;

                    try{
                        
                        //有参数，打包成数组
                        object[] param=new object[]{
                                p0,
                                p1,
                        };
                        object ret = appDomain.Invoke(methodCanMoveItem1, instance, param );
                        
                        
                        isCallingCanMoveItem1 = false;

                        
                        return (System.Boolean)ret;
                        
                    }
                    catch(Exception e){
                        mb.App.logger.Log("**** Catch Exception In CanMoveItem *****");
                        mb.App.logger.Log(e.ToString());
                        mb.App.logger.Log("**********************");
                        throw e;
                    }
                }
                else
                {
                    
                    
                        
                            return base.CanMoveItem(p0, p1);
                        
                    

                }
            }
        
        
        
        IMethod methodCanPerformAction2;
        bool isCallingCanPerformAction2= false;
        
            public override System.Boolean CanPerformAction(UIKit.UICollectionView p0, ObjCRuntime.Selector p1, Foundation.NSIndexPath p2, Foundation.NSObject p3) 
            { 
                if (methodCanPerformAction2 == null && instance!=null )
                {
                    methodCanPerformAction2 = instance.Type.GetMethod("CanPerformAction", 4);
                }
                if (methodCanPerformAction2 != null && !isCallingCanPerformAction2)
                {
                    isCallingCanPerformAction2 = true;

                    try{
                        
                        //有参数，打包成数组
                        object[] param=new object[]{
                                p0,
                                p1,
                                p2,
                                p3,
                        };
                        object ret = appDomain.Invoke(methodCanPerformAction2, instance, param );
                        
                        
                        isCallingCanPerformAction2 = false;

                        
                        return (System.Boolean)ret;
                        
                    }
                    catch(Exception e){
                        mb.App.logger.Log("**** Catch Exception In CanPerformAction *****");
                        mb.App.logger.Log(e.ToString());
                        mb.App.logger.Log("**********************");
                        throw e;
                    }
                }
                else
                {
                    
                    
                        
                            return base.CanPerformAction(p0, p1, p2, p3);
                        
                    

                }
            }
        
        
        
        IMethod methodDidChangeAdjustedContentInset3;
        bool isCallingDidChangeAdjustedContentInset3= false;
        
            public override void DidChangeAdjustedContentInset(UIKit.UIScrollView p0) 
            { 
                if (methodDidChangeAdjustedContentInset3 == null && instance!=null )
                {
                    methodDidChangeAdjustedContentInset3 = instance.Type.GetMethod("DidChangeAdjustedContentInset", 1);
                }
                if (methodDidChangeAdjustedContentInset3 != null && !isCallingDidChangeAdjustedContentInset3)
                {
                    isCallingDidChangeAdjustedContentInset3 = true;

                    try{
                        
                        //有参数，打包成数组
                        object[] param=new object[]{
                                p0,
                        };
                        object ret = appDomain.Invoke(methodDidChangeAdjustedContentInset3, instance, param );
                        
                        
                        isCallingDidChangeAdjustedContentInset3 = false;

                        
                    }
                    catch(Exception e){
                        mb.App.logger.Log("**** Catch Exception In DidChangeAdjustedContentInset *****");
                        mb.App.logger.Log(e.ToString());
                        mb.App.logger.Log("**********************");
                        throw e;
                    }
                }
                else
                {
                    
                    
                        
                            base.DidChangeAdjustedContentInset(p0);
                        
                    

                }
            }
        
        
        
        IMethod methodDidUpdateFocus4;
        bool isCallingDidUpdateFocus4= false;
        
            public override void DidUpdateFocus(UIKit.UICollectionView p0, UIKit.UICollectionViewFocusUpdateContext p1, UIKit.UIFocusAnimationCoordinator p2) 
            { 
                if (methodDidUpdateFocus4 == null && instance!=null )
                {
                    methodDidUpdateFocus4 = instance.Type.GetMethod("DidUpdateFocus", 3);
                }
                if (methodDidUpdateFocus4 != null && !isCallingDidUpdateFocus4)
                {
                    isCallingDidUpdateFocus4 = true;

                    try{
                        
                        //有参数，打包成数组
                        object[] param=new object[]{
                                p0,
                                p1,
                                p2,
                        };
                        object ret = appDomain.Invoke(methodDidUpdateFocus4, instance, param );
                        
                        
                        isCallingDidUpdateFocus4 = false;

                        
                    }
                    catch(Exception e){
                        mb.App.logger.Log("**** Catch Exception In DidUpdateFocus *****");
                        mb.App.logger.Log(e.ToString());
                        mb.App.logger.Log("**********************");
                        throw e;
                    }
                }
                else
                {
                    
                    
                        
                            base.DidUpdateFocus(p0, p1, p2);
                        
                    

                }
            }
        
        
        
        IMethod methodDidZoom5;
        bool isCallingDidZoom5= false;
        
            public override void DidZoom(UIKit.UIScrollView p0) 
            { 
                if (methodDidZoom5 == null && instance!=null )
                {
                    methodDidZoom5 = instance.Type.GetMethod("DidZoom", 1);
                }
                if (methodDidZoom5 != null && !isCallingDidZoom5)
                {
                    isCallingDidZoom5 = true;

                    try{
                        
                        //有参数，打包成数组
                        object[] param=new object[]{
                                p0,
                        };
                        object ret = appDomain.Invoke(methodDidZoom5, instance, param );
                        
                        
                        isCallingDidZoom5 = false;

                        
                    }
                    catch(Exception e){
                        mb.App.logger.Log("**** Catch Exception In DidZoom *****");
                        mb.App.logger.Log(e.ToString());
                        mb.App.logger.Log("**********************");
                        throw e;
                    }
                }
                else
                {
                    
                    
                        
                            base.DidZoom(p0);
                        
                    

                }
            }
        
        
        
        IMethod methodGetCell6;
        bool isCallingGetCell6= false;
        
            public override UIKit.UICollectionViewCell GetCell(UIKit.UICollectionView p0, Foundation.NSIndexPath p1) 
            { 
                if (methodGetCell6 == null && instance!=null )
                {
                    methodGetCell6 = instance.Type.GetMethod("GetCell", 2);
                }
                if (methodGetCell6 != null && !isCallingGetCell6)
                {
                    isCallingGetCell6 = true;

                    try{
                        
                        //有参数，打包成数组
                        object[] param=new object[]{
                                p0,
                                p1,
                        };
                        object ret = appDomain.Invoke(methodGetCell6, instance, param );
                        
                        
                        isCallingGetCell6 = false;

                        
                        return (UIKit.UICollectionViewCell)ret;
                        
                    }
                    catch(Exception e){
                        mb.App.logger.Log("**** Catch Exception In GetCell *****");
                        mb.App.logger.Log(e.ToString());
                        mb.App.logger.Log("**********************");
                        throw e;
                    }
                }
                else
                {
                    
                    
                        
                            return base.GetCell(p0, p1);
                        
                    

                }
            }
        
        
        
        IMethod methodGetItemsCount7;
        bool isCallingGetItemsCount7= false;
        
            public override System.nint GetItemsCount(UIKit.UICollectionView p0, System.nint p1) 
            { 
                if (methodGetItemsCount7 == null && instance!=null )
                {
                    methodGetItemsCount7 = instance.Type.GetMethod("GetItemsCount", 2);
                }
                if (methodGetItemsCount7 != null && !isCallingGetItemsCount7)
                {
                    isCallingGetItemsCount7 = true;

                    try{
                        
                        //有参数，打包成数组
                        object[] param=new object[]{
                                p0,
                                p1,
                        };
                        object ret = appDomain.Invoke(methodGetItemsCount7, instance, param );
                        
                        
                        isCallingGetItemsCount7 = false;

                        
                        return (System.nint)ret;
                        
                    }
                    catch(Exception e){
                        mb.App.logger.Log("**** Catch Exception In GetItemsCount *****");
                        mb.App.logger.Log(e.ToString());
                        mb.App.logger.Log("**********************");
                        throw e;
                    }
                }
                else
                {
                    
                    
                        
                            return base.GetItemsCount(p0, p1);
                        
                    

                }
            }
        
        
        
        IMethod methodItemDeselected8;
        bool isCallingItemDeselected8= false;
        
            public override void ItemDeselected(UIKit.UICollectionView p0, Foundation.NSIndexPath p1) 
            { 
                if (methodItemDeselected8 == null && instance!=null )
                {
                    methodItemDeselected8 = instance.Type.GetMethod("ItemDeselected", 2);
                }
                if (methodItemDeselected8 != null && !isCallingItemDeselected8)
                {
                    isCallingItemDeselected8 = true;

                    try{
                        
                        //有参数，打包成数组
                        object[] param=new object[]{
                                p0,
                                p1,
                        };
                        object ret = appDomain.Invoke(methodItemDeselected8, instance, param );
                        
                        
                        isCallingItemDeselected8 = false;

                        
                    }
                    catch(Exception e){
                        mb.App.logger.Log("**** Catch Exception In ItemDeselected *****");
                        mb.App.logger.Log(e.ToString());
                        mb.App.logger.Log("**********************");
                        throw e;
                    }
                }
                else
                {
                    
                    
                        
                            base.ItemDeselected(p0, p1);
                        
                    

                }
            }
        
        
        
        IMethod methodItemHighlighted9;
        bool isCallingItemHighlighted9= false;
        
            public override void ItemHighlighted(UIKit.UICollectionView p0, Foundation.NSIndexPath p1) 
            { 
                if (methodItemHighlighted9 == null && instance!=null )
                {
                    methodItemHighlighted9 = instance.Type.GetMethod("ItemHighlighted", 2);
                }
                if (methodItemHighlighted9 != null && !isCallingItemHighlighted9)
                {
                    isCallingItemHighlighted9 = true;

                    try{
                        
                        //有参数，打包成数组
                        object[] param=new object[]{
                                p0,
                                p1,
                        };
                        object ret = appDomain.Invoke(methodItemHighlighted9, instance, param );
                        
                        
                        isCallingItemHighlighted9 = false;

                        
                    }
                    catch(Exception e){
                        mb.App.logger.Log("**** Catch Exception In ItemHighlighted *****");
                        mb.App.logger.Log(e.ToString());
                        mb.App.logger.Log("**********************");
                        throw e;
                    }
                }
                else
                {
                    
                    
                        
                            base.ItemHighlighted(p0, p1);
                        
                    

                }
            }
        
        
        
        IMethod methodItemSelected10;
        bool isCallingItemSelected10= false;
        
            public override void ItemSelected(UIKit.UICollectionView p0, Foundation.NSIndexPath p1) 
            { 
                if (methodItemSelected10 == null && instance!=null )
                {
                    methodItemSelected10 = instance.Type.GetMethod("ItemSelected", 2);
                }
                if (methodItemSelected10 != null && !isCallingItemSelected10)
                {
                    isCallingItemSelected10 = true;

                    try{
                        
                        //有参数，打包成数组
                        object[] param=new object[]{
                                p0,
                                p1,
                        };
                        object ret = appDomain.Invoke(methodItemSelected10, instance, param );
                        
                        
                        isCallingItemSelected10 = false;

                        
                    }
                    catch(Exception e){
                        mb.App.logger.Log("**** Catch Exception In ItemSelected *****");
                        mb.App.logger.Log(e.ToString());
                        mb.App.logger.Log("**********************");
                        throw e;
                    }
                }
                else
                {
                    
                    
                        
                            base.ItemSelected(p0, p1);
                        
                    

                }
            }
        
        
        
        IMethod methodItemUnhighlighted11;
        bool isCallingItemUnhighlighted11= false;
        
            public override void ItemUnhighlighted(UIKit.UICollectionView p0, Foundation.NSIndexPath p1) 
            { 
                if (methodItemUnhighlighted11 == null && instance!=null )
                {
                    methodItemUnhighlighted11 = instance.Type.GetMethod("ItemUnhighlighted", 2);
                }
                if (methodItemUnhighlighted11 != null && !isCallingItemUnhighlighted11)
                {
                    isCallingItemUnhighlighted11 = true;

                    try{
                        
                        //有参数，打包成数组
                        object[] param=new object[]{
                                p0,
                                p1,
                        };
                        object ret = appDomain.Invoke(methodItemUnhighlighted11, instance, param );
                        
                        
                        isCallingItemUnhighlighted11 = false;

                        
                    }
                    catch(Exception e){
                        mb.App.logger.Log("**** Catch Exception In ItemUnhighlighted *****");
                        mb.App.logger.Log(e.ToString());
                        mb.App.logger.Log("**********************");
                        throw e;
                    }
                }
                else
                {
                    
                    
                        
                            base.ItemUnhighlighted(p0, p1);
                        
                    

                }
            }
        
        
        
        IMethod methodNumberOfSections12;
        bool isCallingNumberOfSections12= false;
        
            public override System.nint NumberOfSections(UIKit.UICollectionView p0) 
            { 
                if (methodNumberOfSections12 == null && instance!=null )
                {
                    methodNumberOfSections12 = instance.Type.GetMethod("NumberOfSections", 1);
                }
                if (methodNumberOfSections12 != null && !isCallingNumberOfSections12)
                {
                    isCallingNumberOfSections12 = true;

                    try{
                        
                        //有参数，打包成数组
                        object[] param=new object[]{
                                p0,
                        };
                        object ret = appDomain.Invoke(methodNumberOfSections12, instance, param );
                        
                        
                        isCallingNumberOfSections12 = false;

                        
                        return (System.nint)ret;
                        
                    }
                    catch(Exception e){
                        mb.App.logger.Log("**** Catch Exception In NumberOfSections *****");
                        mb.App.logger.Log(e.ToString());
                        mb.App.logger.Log("**********************");
                        throw e;
                    }
                }
                else
                {
                    
                    
                        
                            return base.NumberOfSections(p0);
                        
                    

                }
            }
        
        
        
        IMethod methodDidChange13;
        bool isCallingDidChange13= false;
        
            public override void DidChange(Foundation.NSKeyValueChange p0, Foundation.NSIndexSet p1, Foundation.NSString p2) 
            { 
                if (methodDidChange13 == null && instance!=null )
                {
                    methodDidChange13 = instance.Type.GetMethod("DidChange", 3);
                }
                if (methodDidChange13 != null && !isCallingDidChange13)
                {
                    isCallingDidChange13 = true;

                    try{
                        
                        //有参数，打包成数组
                        object[] param=new object[]{
                                p0,
                                p1,
                                p2,
                        };
                        object ret = appDomain.Invoke(methodDidChange13, instance, param );
                        
                        
                        isCallingDidChange13 = false;

                        
                    }
                    catch(Exception e){
                        mb.App.logger.Log("**** Catch Exception In DidChange *****");
                        mb.App.logger.Log(e.ToString());
                        mb.App.logger.Log("**********************");
                        throw e;
                    }
                }
                else
                {
                    
                    
                        
                            base.DidChange(p0, p1, p2);
                        
                    

                }
            }
        
        
        
        IMethod methodDidChange14;
        bool isCallingDidChange14= false;
        
            public override void DidChange(Foundation.NSString p0, Foundation.NSKeyValueSetMutationKind p1, Foundation.NSSet p2) 
            { 
                if (methodDidChange14 == null && instance!=null )
                {
                    methodDidChange14 = instance.Type.GetMethod("DidChange", 3);
                }
                if (methodDidChange14 != null && !isCallingDidChange14)
                {
                    isCallingDidChange14 = true;

                    try{
                        
                        //有参数，打包成数组
                        object[] param=new object[]{
                                p0,
                                p1,
                                p2,
                        };
                        object ret = appDomain.Invoke(methodDidChange14, instance, param );
                        
                        
                        isCallingDidChange14 = false;

                        
                    }
                    catch(Exception e){
                        mb.App.logger.Log("**** Catch Exception In DidChange *****");
                        mb.App.logger.Log(e.ToString());
                        mb.App.logger.Log("**********************");
                        throw e;
                    }
                }
                else
                {
                    
                    
                        
                            base.DidChange(p0, p1, p2);
                        
                    

                }
            }
        
        
        
        IMethod methodDidChangeValue15;
        bool isCallingDidChangeValue15= false;
        
            public override void DidChangeValue(System.String p0) 
            { 
                if (methodDidChangeValue15 == null && instance!=null )
                {
                    methodDidChangeValue15 = instance.Type.GetMethod("DidChangeValue", 1);
                }
                if (methodDidChangeValue15 != null && !isCallingDidChangeValue15)
                {
                    isCallingDidChangeValue15 = true;

                    try{
                        
                        //有参数，打包成数组
                        object[] param=new object[]{
                                p0,
                        };
                        object ret = appDomain.Invoke(methodDidChangeValue15, instance, param );
                        
                        
                        isCallingDidChangeValue15 = false;

                        
                    }
                    catch(Exception e){
                        mb.App.logger.Log("**** Catch Exception In DidChangeValue *****");
                        mb.App.logger.Log(e.ToString());
                        mb.App.logger.Log("**********************");
                        throw e;
                    }
                }
                else
                {
                    
                    
                        
                            base.DidChangeValue(p0);
                        
                    

                }
            }
        
        
    }
}